package com.woniu.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 门诊表挂号表
 * @TableName registration
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@TableName("registration")
public class Registration implements Serializable {
    /**
     * 主键id
     */
    private Integer id;

    /**
     * 挂号单号
     */
    private String rsNo;

    /**
     * 门诊科室id
     */

    private Integer rsDepartmentId;

    /**
     * 门诊医生id
     */
    private Integer doctorId;

    /**
     * 挂号状态 0是挂号 1是已缴费 2是退号
     */
    private  Integer rsStatus;

    /**
     * 创建日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date rsCreateDate;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private Date rsCreateTime;

    /**
     * 用户id
     */
    private Integer rsUserId;

    /**
     * 病人id
     */
    private Integer rsPatientId;

    /**
     * 就诊时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date rsRegistrationTime;

    /**
     * 预约就诊时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date rsPreTime;

    /**
     * 关联time_slot的id，标记用户选择的具体时段
     */
    private Integer timeSlotId;

    @TableField(exist = false)
    private String pname;
    @TableField(exist = false)
    private String sName;
    @TableField(exist = false)
    private String rName;
    @TableField(exist = false)
    private String pcard;
    @TableField(exist = false)
    private String pgender;
    @TableField(exist = false)
    private String page;

    private static final long serialVersionUID = 1L;
}